Package com.apps.test

Source Code of com.apps.test.SaveonbookSearchServiceTest

/*
* @author Cole Gehlen
*/


package com.apps.test;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.Test;



import com.apps.datastore.dao.BookInformation;
import com.apps.services.SaveonbookService;
import com.apps.services.factory.SaveonBookServiceFactory;
import com.apps.ubc.cc.model.SaveonBookModel;


public class SaveonbookSearchServiceTest {

  @Test
  public void test() {
   
    SaveonbookService sss = SaveonBookServiceFactory.getSaveonbookService();
    BookInformation testbi = new BookInformation("Discrete Mathematics W/Applications 4/E", "Required", "EPP", "9780495391326");

    List<SaveonBookModel> sbml1 =  sss.search(testbi);
    List<SaveonBookModel> sbml2 =  sss.titleSearch("Discrete Mathematics with Applications");
   
    assertTrue(sbml2.get(0).getCourse().equals(">CPSC121"));
   
    assertTrue(sss.getOptimizedTitle(testbi).equals("Discrete Mathematics with Applications"));
   
    assertTrue(sss.getPriceRange(sbml1)[0] == 49 && sss.getPriceRange(sbml1)[1] == 180);

   
 
 
  }

}
TOP

Related Classes of com.apps.test.SaveonbookSearchServiceTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.